import request from '@/utils/request'

/**
 * 用户表分页查询
 * @param {查询条件} data
 */
export function listUser(query) {
  return request({
    url: 'business/User/list',
    method: 'get',
    params: query,
  })
}

/**
 * 新增用户表
 * @param data
 */
export function addUser(data) {
  return request({
    url: 'business/User',
    method: 'post',
    data: data,
  })
}
/**
 * 修改用户表
 * @param data
 */
export function updateUser(data) {
  return request({
    url: 'business/User',
    method: 'PUT',
    data: data,
  })
}
/**
 * 获取用户表详情
 * @param {Id}
 */
export function getUser(id) {
  return request({
    url: 'business/User/' + id,
    method: 'get'
  })
}

/**
 * 删除用户表
 * @param {主键} pid
 */
export function delUser(pid) {
  return request({
    url: 'business/User/delete/' + pid,
    method: 'POST'
  })
}
